/*
** AY8910 from MAME
*/

enum {
	SOUND_AY8910,
	SOUND_AY8912,
	SOUND_AY8913,
	SOUND_AY8930,
	SOUND_YM2149,
	SOUND_YM3439,
	SOUND_YMZ284,
	SOUND_YMZ294,
};

class CAy8910 : public CBaseSoundDevice {
	protected:
			void* ay;  // MAME

	public:
			void WriteReg(UINT8 reg, UINT8 data);
			int Buffer(short** buf, int length);
			void Write(UINT64 offset, UINT8 data);
			UINT8 Read(UINT64 offset);
			virtual void Init(CMixer* mix, unsigned int clock); // Leaving this virtual for other chips using the same code (YM2149)
			void Reset();
			void Shutdown();
};

// YM2149, pretty much the same chip but with some table modifications.
class CYm2149 : public CAy8910 {
	public:
			void Init(CMixer* mix, unsigned int clock);
};

typedef struct _ay8910_interface ay8910_interface;
struct _ay8910_interface
{
	int					flags;			/* Flags */
	int					res_load[3]; 	/* Load on channel in ohms */

	ISoundDeviceCallbacks* callbacks;
//	devcb_read8			portAread;
//	devcb_read8			portBread;
//	devcb_write8		portAwrite;
//	devcb_write8		portBwrite;
};

